package gov.chinatax.ctcps.generator.dao.pojo;

import java.io.Serializable;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;

/** 
 *        @hibernate.class
 *         table="DM_JHXZ"
 *     
*/
public class DmJhxz implements Serializable {

    /** identifier field */
    private String jhxzDm;

    /** identifier field */
    private String jhxzMc;

    /** full constructor */
    public DmJhxz(String jhxzDm, String jhxzMc) {
        this.jhxzDm = jhxzDm;
        this.jhxzMc = jhxzMc;
    }

    /** default constructor */
    public DmJhxz() {
    }

    /** 
     *                @hibernate.property
     *                 column="JHXZ_DM"
     *                 length="2"
     *             
     */
    public String getJhxzDm() {
        return this.jhxzDm;
    }

    public void setJhxzDm(String jhxzDm) {
        this.jhxzDm = jhxzDm;
    }

    /** 
     *                @hibernate.property
     *                 column="JHXZ_MC"
     *                 length="50"
     *             
     */
    public String getJhxzMc() {
        return this.jhxzMc;
    }

    public void setJhxzMc(String jhxzMc) {
        this.jhxzMc = jhxzMc;
    }

    public String toString() {
        return new ToStringBuilder(this)
            .append("jhxzDm", getJhxzDm())
            .append("jhxzMc", getJhxzMc())
            .toString();
    }

    public boolean equals(Object other) {
        if ( !(other instanceof DmJhxz) ) return false;
        DmJhxz castOther = (DmJhxz) other;
        return new EqualsBuilder()
            .append(this.getJhxzDm(), castOther.getJhxzDm())
            .append(this.getJhxzMc(), castOther.getJhxzMc())
            .isEquals();
    }

    public int hashCode() {
        return new HashCodeBuilder()
            .append(getJhxzDm())
            .append(getJhxzMc())
            .toHashCode();
    }

}
